<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>article_index</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap-theme.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css">
</head>
<body>
<?php $this->load->view('header')?>
<div id ="banner" >
</div>
<hr / >
<div class="container">
	<div class="row">
	  	<div class="col-md-9 item">
			<?php 
		      	foreach ($articles as $article) {
		    ?>
		    <div class="itme_title">
		    	<a href="<?php echo site_url('/article/view/'.$article->id); ?>"><?php echo $article->title;?></a>
		    	<span class="pull-right" ><?php echo $article->view;?>次浏览</span>
			</div>
			<div class="item_body clearfix">
		    	<img class="thumbnail"  src="<?php echo base_url().'public/'.$article->img;?>">
				<p><?php echo $article->desc;?></p>
				<p class="item_time " ><i class="glyphicon glyphicon-time"></i><?php echo date('Y-m-d H:i:s',$article->create_time);?></p>
				<a href="<?php echo site_url('/article/view/'.$article->id); ?>" class="btn btn-warning viewall btn-sm" >阅读全文>></a>
			</div>
			<hr/>
			<?php
				}
			?>
	  	</div>
	  	<div class="col-md-3">.col-md-3</div>
	</div>
</div>
</body>
</html>